package sicnu.cs.aps.common;

/**
 * 常量
 *
 * @author CaiKe
 */
public class Constants {

    public static final String ROLE_STUDENT = "ROLE_STUDENT";
    public static final String ROLE_TEACHER = "ROLE_TEACHER";
    public static final String ROLE_COLLEGE = "ROLE_COLLEGE";
    public static final String ROLE_COLLEGE_SUB = "ROLE_COLLEGE_SUB";
    public static final String ROLE_UNIVERSITY = "ROLE_UNIVERSITY";
    public static final String ROLE_UNIVERSITY_SUB = "ROLE_UNIVERSITY_SUB";
    public static final String ROLE_SYSTEM = "ROLE_SYSTEM";


    public static final String PREFIX_HEAD_IMG = "head_img_";


    public static final String APS_BASE_URL = "http://" + "localhost:8080" + "/";

    /**
     * 登录字段
     */
    public static final String LOGIN_NAME = "username";
    public static final String LOGIN_PASSWORD = "password";

    /**
     * 重置邮箱，每日请求上限和请求间隔
     */
    public static final Integer EMAIL_RESET_DAY_LIMIT = 5;
    public static final Integer EMAIL_RESET_INTERVAL = 1;


    public static final String EMAIL_LOGIN_CODE_KEY = "email_login::code::";

    /**
     * Redis相关的key
     */
    public static final String REDIS_EMAIL_CODE = "register:code:";


    /**
     * 用户导入模式
     */
    public static final int USER_IMPORT_STUDENT = 1;
    public static final int USER_IMPORT_TEACHER = 2;
    public static final int USER_IMPORT_OTHER = 3;

    /**
     * 用户导入全部成功
     */
    public static final int USER_IMPORT_STATE_SUCCESS = 0;
    /**
     * 用户导入部分成功
     */
    public static final int USER_IMPORT_STATE_PARTIAL_SUCCESS = 1;
    /**
     * 用户导入失败
     */
    public static final int USER_IMPORT_STATE_FAIL = 2;
}
